function disp_prompt()
{
	var name=prompt("Please input your name","Bill Gates");
	if(name!=null && name!=""){
		var x = document.getElementById("sayHello");
		x.innerHTML="Hello "+name+", long time no see.";
		//document.write("Hello "+name+", long time no see.");
	}
}

function functionWithParam(txt)
{
	alert(txt);
}

function returnValue()
{
	return "Hello David, directly write out the return value here from the outside script.";
}

function message()
{
	var txt="";
	try{
		adddlert("Welcome David.");
	}catch(err){
		txt="本页存在错误！\n"
		txt+="点击'确定'继续本页\n";
		txt+="点击'取消'返回百度首页\n";
		if(!confirm(txt)){
			document.location.href="http://www.baidu.com";
		}
	}
}

function message2()
{
	adddlert("Welcome David.");
}

onerror=handleError // onerror

function handleError(msg,url,l)
{
	var txt="";
	txt="本页中存在错误。\n\n"
	txt+="错误：" + msg + "\n"
	txt+="URL: " + url + "\n"
	txt+="行：" + l + "\n\n"
	txt+="点击“确定”继续。\n\n"
	alert(txt)
	return true
}

// Deep in JavaScript
function getNavigatorInfo()
{
	var browser=navigator.appName;
	var b_ver=navigator.appVersion;
	var version=parseFloat(b_ver);
	document.write("浏览器："+browser);
	document.write("<br />");
	document.write("版本："+version);
	document.write("<br />");
	document.write("代码："+navigator.appCodeName);
	document.write("<br />");
	document.write("平台："+navigator.platform);
	document.write("<br />");
	document.write("Cookies启用："+navigator.cookieEnabled);
	document.write("<br />");
	document.write("浏览器的用户代理报头："+navigator.userAgent+"<br />");
}